The invention relates to an image processing system.
Image processing systems are used to effect changes to images by processing data that represents the image for example as a multiplicity of pixels that together form the image. Such changes include adjusting the color of an image for any one or more of a variety of reasons including correcting skin tones, varying overall brightness (e.g., changing day to night) and changing from one color to another.
The representation of color is a complex issue because the perception of color depends on many factors including the light available to light a scene, the sensitivity of the eye to different colors and psychological effects such as mood and atmosphere. The eye is sensitive to both brightness and hues, i.e., the amount of light and the appearance of the color (redness, orangeness, yellowness, etc.). That is, any color can be represented by a single hue plus a given amount of white (or xe2x80x9cgreynessxe2x80x9d). Since white is a combination of all colors, it follows that a single color can be represented by a single hue plus a given amount of all visible color.
Several different data formats are used in electronic environments to represent color in an image. In television-type systems (and this includes systems capable of handling broadcast-quality pictures up to systems capable of handling print-quality pictures) images are commonly represented by data defining each picture element in terms of a brightness component and color component. The brightness component is commonly referred to as the xe2x80x9cluminancexe2x80x9d and represents the greyness of each picture element. The color component is commonly referred to as the xe2x80x9cchrominancexe2x80x9d and represents the hue (i.e., whether the color is red, green, orange, yellow, etc.) and saturation (i.e., the relative amount of hue) of each picture element. Black, grey and white have no chrominance, only luminance, but any color has both chrominance and luminance. The chrominance information is commonly defined in terms of color difference signals with respect to luminance Y, namely R-Y and B-Y, where R=red, B=blue. Since Y=R+G+B, where G=green, and any color may be defined in terms of its red, green and blue components, it follows that any color may be defined by the three signals Y, (R-Y) and (B-Y). These three signals are also referred to as YUV and YIQ signals (although strictly speaking these references are only correct in respect of certain elements of a television signal) and Y Cr Cb which are the digital equivalents of the analogue Y, (R-Y) and (B-Y) signals.
Perception of color is relative and is also dependent on the eye""s sensitivity to different wavelengths of light. In virtually any captured image the color will not be a true representation of the color in the original scene. This is because the means by which the image is captured may not have a sufficient dynamic range to capture all color, may be incapable of representing certain color or simply may not represent certain color correctly. Normally, this is not a problem because the mind perceives color relative to each other and, as long as a reference color such as skin tone appears correct, usually the color will appear relatively correct.
There are, however, situations where a problem may remain. For example, in color photography certain flowers appear to be pink instead of blue although every other color in the image appears satisfactory, because some blue flowers reflect both blue light and infrared light and while the eye is not sensitive to infrared light some color films are.
One way of correcting a problem such as this would be selectively to adjust the chrominance values so that the color in the flower are changed from the incorrect range of pinks (the source color space) to the xe2x80x9ccorrectxe2x80x9d, i.e. acceptable, range of blues (the target color space). However, simply adjusting the chrominance to that of the target colour space may result in those colors appearing too light to too dark. This is because every colour can also be regarded as one or more light components of given wavelengths within the visible spectrum, and the eye is not uniformly sensitive to the different wavelengths of light across the spectrum. In fact the eye is most sensitive to greens which correspond to wavelengths in the middle of the visible spectrum and is less sensitive to reds and blues corresponding to wavelengths at the ends of the visible spectrum. If the color in a picture of a pink flower is changed to blue it may be necessary to reduce the luminance values as well as the chrominance values so that the blue does not appear too bright. However, simply reducing the luminance can cause other problems because the luminance contains the most information about details in an image. For example, highlights or reflections in an image are almost entirely luminance and very little chrominance. Thus, reducing the luminance will reduce the highlights leading to a loss in detail in the image. Also, reducing the luminance will reduce the brightness in other colours making them appear too dark.
A more extreme example would be changing yellows in a picture into blues or vice versa. Yellow is nearer the middle of the visible spectrum than is blue and, because of the eyes greater sensitivity in the middle of the spectrum, yellow is therefore a brighter color (higher luminance values) than blue. Simply mapping yellow onto blue by changing the chrominance values will result in a blue that is too bright and in extreme examples appears luminous. Again, reducing the values of the luminance data will make other colors in the picture appear too dark.
In image processing a stencil or control image is commonly used to restrict processing of an image to a specified area of interest, for example the portion of the image containing the pink flower. This approach is acceptable but it does not overcome the problem of loss of detail when luminance values are reduced.
Clearly, therefore, there is a need for an image processing system that is able to change colors in an image so that all colors appear relatively correct without reducing the detail in the colour-changed areas of the example.
The present invention aims to overcome the above discussed problems and meet the above-identified need.
According to one aspect of the invention there is provided an image processing apparatus comprising: a source of image data defining colors of a multiplicity of pixels which together form an initial color image, an initial color of each pixel of the initial color image being defined in terms of an initial brightness value and an initial hue value; a transforming circuit for transforming the initial hue value of a pixel to represent a new hue value; a deriving circuit for deriving brightness data representing inherent brightness values associated respectively with the initial and new hue values of a pixel; and a calculating circuit for calculating from the initial brightness value and the inherent brightness values associated with the initial and new hue values a new brightness value which together with the new hue value defines a new pixel colour value.
According to another aspect of the invention there is provided An image processing method comprising: supplying image data defining color of a multiplicity of pixels which together form an initial color image, an initial color of each pixel of the initial color image being defined in terms of an initial brightness value and an initial hue value; transforming the initial hue value of a pixel to represent a new hue value; deriving brightness data representing inherent brightness values associated respectively with the initial and new hue values of a pixel; and calculating from the initial brightness value and the inherent brightness values associated with the initial and new hue values a new brightness value which together with the new hue value defines a new pixel color value.
The invention also provides an image processing system for converting data representing a picture element with an original color, defined in terms of original brightness and hue values into data representing the picture element with a new colour, different than the original color; in which system a new hue value is calculated from the original hue value, the original and new hue values are both processed to determine respective inherent brightness values associated therewith, and the original brightness value is processed with the inherent brightness values to produce a new brightness value that together with the new hue value defines the new colour of the pixel.
The invention can be said to reside in the realisation that for any given value of chrominance (i.e., any combination of, for example, (R-Y) and (B-Y) or U, V OR Cr, Cb) there is a corresponding brightness value (i.e., luminance component) which is proportional to the eyes sensitivity to the given value. As will be explained in greater detail hereinafter, the brightness value for a given color can be calculated in advance and then used in a colour transformation to effect a color change operation to data representing an initial image to produce data representing a resultant image in which the color appear to be correct.
The above and further features of the invention are set forth with particularity in the appended claims and together with advantages thereof will become clearer from consideration of the following detailed description of an exemplary embodiment of the invention given with reference to the accompanying drawings.